<template>
  <div class="px-4">
    <div class="flex justify-end my-2">
      <BaseExport
        type="手术统计"
        name="今日手术"
        code="000679"
        :search-params="{
          stdate: dayjs().format('YYYY-MM-DD'),
          eddate: dayjs().format('YYYY-MM-DD'),
          oprPath: '1'
        }"
        >导出</BaseExport
      >
    </div>
    <BaseTable column-code="000679" :loading="loading" :scroll="{ x: 2200 }" :data-source="tableData" fill>
      <template #bodyCell="{ column, index }">
        <template v-if="column.dataIndex === 'xh'">
          {{ index + 1 }}
        </template>
      </template>
    </BaseTable>
  </div>
</template>
<script setup>
import dayjs from 'dayjs'
import BaseTable from '@/components/BaseTable'

const { loading, tableData } = useTable({
  url: '/oprOperation/opr/getOperationAppointmentList',
  immediate: true,
  pagination: false,
  formatParams: () => {
    return {
      stdate: dayjs().format('YYYY-MM-DD'),
      eddate: dayjs().format('YYYY-MM-DD'),
      statuss: ['1', '3', '4', '5', '6'],
      oprPath: '1'
    }
  }
})
</script>
